:: Convergent Sequences and the Limit of Sequences :: by Jaros{\l}aw Kotowicz :: :: Received July 4, 1989 :: Copyright (c) 1990-2026 Association of Mizar Users :: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland). :: This code can be distributed under the GNU General Public Licence :: version 3.0 or later, or the Creative Commons Attribution-ShareAlike :: License version 3.0 or later, subject to the binding interpretation :: detailed in file COPYING.interpretation. :: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these :: licenses, or see http://www.gnu.org/licenses/gpl.html and :: http://creativecommons.org/licenses/by-sa/3.0/. environ vocabularies NUMBERS, SUBSET_1, XREAL_0, SEQ_1, VALUED_0, FUNCT_1, ARYTM_1, ARYTM_3, COMPLEX1, XXREAL_0, CARD_1, RELAT_1, XXREAL_2, NAT_1, ORDINAL2, TARSKI, REAL_1, VALUED_1, SEQ_2, COMSEQ_1, XCMPLX_0, SQUARE_1; notations TARSKI, SUBSET_1, ORDINAL1, NUMBERS, XCMPLX_0, XREAL_0, COMPLEX1, REAL_1, NAT_1, RELAT_1, FUNCT_1, VALUED_0, VALUED_1, FUNCOP_1, SEQ_1, XXREAL_0, SQUARE_1, COMSEQ_1, COMSEQ_2; constructors XXREAL_0, REAL_1, NAT_1, COMPLEX1, PARTFUN1, VALUED_1, RELSET_1, FUNCOP_1, COMSEQ_2, SQUARE_1, SEQ_1; registrations ORDINAL1, RELSET_1, XXREAL_0, XREAL_0, MEMBERED, XBOOLE_0, VALUED_0, VALUED_1, FUNCT_2, NUMBERS, COMSEQ_2, XCMPLX_0, SQUARE_1, NAT_1, SEQ_1; requirements REAL, NUMERALS, SUBSET, ARITHM; definitions COMSEQ_2; equalities SQUARE_1, COMPLEX1, VALUED_1; expansions COMSEQ_2; theorems SEQ_1, ABSVALUE, NAT_1, XREAL_0, XCMPLX_0, XCMPLX_1, XREAL_1, COMPLEX1, XXREAL_0, VALUED_1, FUNCT_2, VALUED_0, COMSEQ_2, NUMBERS, SQUARE_1, ORDINAL1; schemes NAT_1; begin reserve n,n1,n2,m for Nat, r,r1,r2,p,g1,g2,g for Real, seq,seq9,seq1 for Real_Sequence, y for set; theorem Th1: -g0 & r<>0 implies |.g"-r".|=|.g-r.|/(|.g.|*|.r.|) proof assume that A1: g<>0 and A2: r<>0; thus |.g"-r".|=|.1/g-r".| by XCMPLX_1:215 .=|.1/g-1/r.| by XCMPLX_1:215 .=|.(1*r-1*g)/(g*r).| by A1,A2,XCMPLX_1:130 .=|.r-g.|/|.g*r.| by COMPLEX1:67 .=|.-(g-r).|/(|.g.|*|.r.|) by COMPLEX1:65 .=|.g-r.|/(|.g.|*|.r.|) by COMPLEX1:52; end; definition let f be real-valued Function; attr f is bounded_above means ex r st for y being object st y in dom f holds f.y bounded_above bounded_below for real-valued Function; coherence proof let f be real-valued Function; given r such that A1: for y st y in dom f holds |.f.y.| bounded for real-valued Function; coherence proof let f be real-valued Function; assume f is bounded_above; then consider r1 such that A5: for y being object st y in dom f holds f.y = g by COMPLEX1:13; now assume A3: g is not real; A4: Im g <> 0 by A2,A3; set p = |.Im g.|; A5: p > 0 by A4,COMPLEX1:47; not ex n st for m st n<=m holds |.seq.m-g.|< p proof let n; take n; thus n<=n; reconsider sn = seq.n as Element of REAL by XREAL_0:def 1; A6: Im(sn) = 0 by COMPLEX1:def 2; A7: Im(seq.n-g) = Im(seq.n)-Im g by COMPLEX1:19; A8: |.seq.n-g.| = sqrt ((Re(seq.n-g))^2 + (Im g)^2) by A7,A6; (Re(seq.n-g))^2 >= 0 by XREAL_1:63; then sqrt((Re(seq.n-g))^2+|.Im g.|^2) >= |.Im g.| by SQUARE_1:58; hence |.seq.n-g.| >= |.Im g.| by A8,COMPLEX1:75; end; hence contradiction by A1,A5; end; then reconsider g as Real; take g; let p; reconsider p as Real; 0

Real means :Def6: for p st 0

g2; A5: now assume |.g1-g2.|=0; then 0+g2=g1-g2+g2 by ABSVALUE:2; hence contradiction by A4; end; A6: 0<=|.g1-g2.| by COMPLEX1:46; then consider n1 such that A7: for m st n1<=m holds |.seq.m-g1.|<|.g1-g2.|/4 by A2,A5; consider n2 such that A8: for m st n2<=m holds |.seq.m-g2.|<|.g1-g2.|/4 by A3,A5,A6; A9: |.seq.(n1+n2)-g1.|<|.g1-g2.|/4 by A7,NAT_1:12; |.seq.(n1+n2)-g2.|<|.g1-g2.|/4 by A8,NAT_1:12; then A10: |.seq.(n1+n2)-g2.|+|.seq.(n1+n2)-g1.|<|.g1-g2.|/4+|.g1-g2.|/4 by A9,XREAL_1:8; |.g1-g2.|=|.-(seq.(n1+n2)-g1)+(seq.(n1+n2)-g2).|; then |.g1-g2.|<=|.-(seq.(n1+n2)-g1).|+|.seq.(n1+n2)-g2.| by COMPLEX1:56; then A11: |.g1-g2.|<=|.seq.(n1+n2)-g1.|+|.seq.(n1+n2)-g2.| by COMPLEX1:52; |.g1-g2.|/2 <|.g1-g2.| by A5,A6,XREAL_1:216; hence contradiction by A10,A11,XXREAL_0:2; end; end; definition let f be real-valued Function; redefine attr f is bounded means f is bounded_above bounded_below; compatibility; end; registration cluster constant -> convergent for Real_Sequence; coherence proof let seq be Real_Sequence; assume seq is constant; then consider r being Element of REAL such that A1: for n being Nat holds seq.n=r by VALUED_0:def 18; take g=r; let p such that A2: 0 convergent for Real_Sequence; coherence by Th5; end; theorem Th6: seq is convergent & seq9 is convergent implies lim (seq + seq9)=(lim seq)+(lim seq9) proof assume that A1: seq is convergent and A2: seq9 is convergent; now let p; assume 00; then A6: 0<|.r.| by COMPLEX1:47; let p such that A7: 0|.r.| by A5,COMPLEX1:47; consider n1 such that A9: for m st n1<=m holds |.seq.m-g1.|

convergent for Real_Sequence; coherence by Th7; end; theorem Th8: seq is convergent implies lim(r(#)seq)=r*(lim seq) proof assume A1: seq is convergent; A2: now assume A3: r=0; let p such that A4: 00; then A6: 0<|.r.| by COMPLEX1:47; let p such that A7: 0|.r.| by A5,COMPLEX1:47; 0

convergent for Real_Sequence; coherence; end; theorem Th10: seq is convergent implies lim(-seq) = -(lim seq) proof assume seq is convergent; then lim ((-1)(#)seq)=(-1)*(lim seq) by Th8; hence thesis; end; theorem Th11: seq is convergent & seq9 is convergent implies seq - seq9 is convergent proof assume that A1: seq is convergent and A2: seq9 is convergent; -seq9 is convergent by A2; hence thesis by A1; end; registration let seq1,seq2 be convergent Real_Sequence; cluster seq1 - seq2 -> convergent for Real_Sequence; coherence by Th11; end; theorem Th12: seq is convergent & seq9 is convergent implies lim(seq - seq9)=(lim seq)-(lim seq9) proof assume that A1: seq is convergent and A2: seq9 is convergent; thus lim(seq - seq9)=(lim seq)+(lim(- seq9)) by A1,A2,Th6 .=(lim seq)+-(lim seq9) by A2,Th10 .=(lim seq)-(lim seq9); end; theorem Th13: seq is convergent implies seq is bounded proof assume seq is convergent; then consider g such that A1: for p st 0

bounded for Real_Sequence; coherence by Th13; end; theorem Th14: seq is convergent & seq9 is convergent implies seq (#) seq9 is convergent proof assume that A1: seq is convergent and A2: seq9 is convergent; consider g1 such that A3: for p st 0

convergent for Real_Sequence; coherence by Th14; end; theorem Th15: seq is convergent & seq9 is convergent implies lim(seq(#)seq9)=(lim seq)*(lim seq9) proof assume that A1: seq is convergent and A2: seq9 is convergent; consider r such that A3: 00 implies ex n st for m st n<=m holds |.lim seq.|/2<|.seq.m.|) proof assume that A1: seq is convergent and A2: lim seq<>0; 0<|.lim seq.| by A2,COMPLEX1:47; then 0<|.lim seq.|/2; then consider n1 such that A3: for m st n1<=m holds |.seq.m-lim seq.|<|.lim seq.|/2 by A1,Def6; take n=n1; let m; assume n<=m; then A4: |.seq.m-lim seq.|<|.lim seq.|/2 by A3; A5: |.lim seq.|-|.seq.m.|<=|.(lim seq)-seq.m.| by COMPLEX1:59; |.(lim seq)-seq.m.|=|.-(seq.m-(lim seq)).| .=|.seq.m-lim seq.| by COMPLEX1:52; then A6: |.lim seq.|-|.seq.m.|<|.lim seq.|/2 by A4,A5,XXREAL_0:2; A7: |.lim seq.|/2+(|.seq.m.|-|.lim seq.|/2) = |.seq.m.|; |.lim seq.|-|.seq.m.|+(|.seq.m.|-|.lim seq.|/2) = |.lim seq.|/2; hence thesis by A6,A7,XREAL_1:6; end; theorem Th17: seq is convergent & (for n holds 0<=seq.n) implies 0<=lim seq proof assume that A1: seq is convergent and A2: for n holds 0<=seq.n and A3: not 0<=(lim seq); 0<-(lim seq) by A3; then consider n1 such that A4: for m st n1<=m holds |.seq.m-lim seq.|<-(lim seq) by A1,Def6; |.seq.n1-lim seq.|<=-(lim seq) by A4; then seq.n1-(lim seq)<=-(lim seq) by ABSVALUE:5; then A5: seq.n1-(lim seq)+(lim seq)<=-(lim seq)+(lim seq) by XREAL_1:6; now assume seq.n1=0; then |.seq.n1-lim seq.|=-(lim seq) by A3,ABSVALUE:def 1; hence contradiction by A4; end; hence contradiction by A2,A5; end; theorem seq is convergent & seq9 is convergent & (for n holds seq.n<=(seq9.n)) implies (lim seq)<=(lim seq9) proof assume that A1: seq is convergent and A2: seq9 is convergent and A3: for n holds seq.n<=(seq9.n); now let n; seq.n<=seq9.n by A3; then A4: seq.n-seq.n<=seq9.n-seq.n by XREAL_1:9; (seq9-seq).n=seq9.n+(-seq).n by SEQ_1:7 .=seq9.n+-seq.n by SEQ_1:10 .=seq9.n-seq.n; hence 0<=(seq9-seq).n by A4; end; then A5: 0<=lim(seq9-seq) by A1,A2,Th17; lim (seq9-seq)=(lim seq9)- (lim seq) by A1,A2,Th12; then 0+(lim seq)<=(lim seq9)-(lim seq)+(lim seq) by A5,XREAL_1:6; hence thesis; end; theorem Th19: seq is convergent & seq9 is convergent & (for n holds seq.n<=(seq1.n) & seq1.n<=seq9.n) & (lim seq)=(lim seq9) implies seq1 is convergent proof assume that A1: seq is convergent and A2: seq9 is convergent and A3: for n holds seq.n<=(seq1.n) & seq1.n<=seq9.n and A4: (lim seq)=(lim seq9); take lim seq; let p; assume A5: 0 0 & seq is non-zero implies seq" is convergent proof assume that A1: seq is convergent and A2: lim seq<>0 and A3: seq is non-zero; A4: 0<|.lim seq.| by A2,COMPLEX1:47; A5: 0<>|.lim seq.| by A2,COMPLEX1:47; consider n1 such that A6: for m st n1<=m holds |.lim seq.|/2<|.seq.m.| by A1,A2,Th16; 0*0<|.lim seq.|*|.lim seq.| by A4; then A7: 0<(|.lim seq.|*|.lim seq.|)/2; take (lim seq)"; let p; assume A8: 00 by A3,SEQ_1:5; then seq.m*(lim seq)<>0 by A2; then 0<|.seq.m*(lim seq).| by COMPLEX1:47; then 0<|.seq.m.|*|.lim seq.| by COMPLEX1:65; then A14: |.seq.m-lim seq.|/(|.seq.m.|*|.lim seq.|)< (p*((|.lim seq.|*|.lim seq.|)/2))/(|.seq.m.|*|.lim seq.|) by A11,XREAL_1:74; A15: (p*((|.lim seq.|*|.lim seq.|)/2))/(|.seq.m.|*|.lim seq.|) =(p*(2"*(|.lim seq.|*|.lim seq.|)))* (|.seq.m.|*|.lim seq.|)" by XCMPLX_0:def 9 .=p*2"*((|.lim seq.|*|.lim seq.|)*(|.lim seq.|*|.seq.m.|)") .=p*2"*((|.lim seq.|*|.lim seq.|)* (|.lim seq.|"*(|.seq.m.|)")) by XCMPLX_1:204 .=p*2"*(|.lim seq.|*(|.lim seq.|*|.lim seq.|")*|.seq.m.|") .=p*2"*(|.lim seq.|*1*(|.seq.m.|)") by A5,XCMPLX_0:def 7 .=p*(|.lim seq.|/2)*|.seq.m.|" .=(p*(|.lim seq.|/2))/|.seq.m.| by XCMPLX_0:def 9; A16: |.(seq").m-(lim seq)".|=|.(seq.m)"-(lim seq)".| by VALUED_1:10 .=|.seq.m-lim seq.|/(|.seq.m.|*|.lim seq.|) by A2,A13,Th2; A17: 0<|.lim seq.|/2 by A4; A18: 0<>|.lim seq.|/2 by A2,COMPLEX1:47; 0*0 0 & seq is non-zero implies lim seq"=(lim seq)" proof assume that A1: seq is convergent and A2: (lim seq)<>0 and A3: seq is non-zero; A4: seq" is convergent by A1,A2,A3,Th21; A5: 0<|.lim seq.| by A2,COMPLEX1:47; A6: 0<>|.lim seq.| by A2,COMPLEX1:47; consider n1 such that A7: for m st n1<=m holds |.lim seq.|/2<|.seq.m.| by A1,A2,Th16; 0*0<|.lim seq.|*|.lim seq.| by A5; then A8: 0<(|.lim seq.|*|.lim seq.|)/2; now let p; assume A9: 00 by A3,SEQ_1:5; then seq.m*(lim seq)<>0 by A2; then 0<|.seq.m*(lim seq).| by COMPLEX1:47; then 0<|.seq.m.|*|.lim seq.| by COMPLEX1:65; then A15: |.seq.m-lim seq.|/(|.seq.m.|*|.lim seq.|)< (p*((|.lim seq.|*|.lim seq.|)/2))/(|.seq.m.|*|.lim seq.|) by A12,XREAL_1:74; A16: (p*((|.lim seq.|*|.lim seq.|)/2))/(|.seq.m.|*|.lim seq.|) =(p*(2"*(|.lim seq.|*|.lim seq.|)))* (|.seq.m.|*|.lim seq.|)" by XCMPLX_0:def 9 .=p*2"*((|.lim seq.|*|.lim seq.|)*(|.lim seq.|*|.seq.m.|)") .=p*2"*((|.lim seq.|*|.lim seq.|)* ((|.lim seq.|)"*(|.seq.m.|)")) by XCMPLX_1:204 .=p*2"*(|.lim seq.|*(|.lim seq.|*|.lim seq.|")*|.seq.m.|") .=p*2"*(|.lim seq.|*1*|.seq.m.|") by A6,XCMPLX_0:def 7 .=p*(|.lim seq.|/2)*|.seq.m.|" .=(p*(|.lim seq.|/2))/|.seq.m.| by XCMPLX_0:def 9; A17: |.(seq").m-(lim seq)".|=|.(seq.m)"-(lim seq)".| by VALUED_1:10 .=|.seq.m-lim seq.|/(|.seq.m.|*|.lim seq.|) by A2,A14,Th2; A18: 0<|.lim seq.|/2 by A5; A19: 0<>|.lim seq.|/2 by A2,COMPLEX1:47; 0*0 0 & seq is non-zero implies seq9/"seq is convergent proof assume that A1: seq9 is convergent and A2: seq is convergent and A3: (lim seq)<>0 and A4: seq is non-zero; seq" is convergent by A2,A3,A4,Th21; hence thesis by A1; end; theorem seq9 is convergent & seq is convergent & lim seq <> 0 & seq is non-zero implies lim(seq9/"seq)=(lim seq9)/(lim seq) proof assume that A1: seq9 is convergent and A2: seq is convergent and A3: (lim seq)<>0 and A4: seq is non-zero; seq" is convergent by A2,A3,A4,Th21; then lim (seq9(#)(seq"))=(lim seq9)*(lim seq") by A1,Th15 .=(lim seq9)*(lim seq)" by A2,A3,A4,Th22 .=(lim seq9)/(lim seq) by XCMPLX_0:def 9; hence thesis; end; theorem Th25: seq is convergent & seq1 is bounded & lim seq=0 implies seq(#)seq1 is convergent proof assume that A1: seq is convergent and A2: seq1 is bounded and A3: lim seq=0; reconsider g1=0 as Real; take g=g1; let p such that A4: 00; (p/r)*r=p*r"*r by XCMPLX_0:def 9 .=p*(r"*r) .=p*1 by A5,XCMPLX_0:def 7 .=p; then A13: (p/r)*|.seq1.m.|

0; (p/r)*r=p*r"*r by XCMPLX_0:def 9 .=p*(r"*r) .=p*1 by A6,XCMPLX_0:def 7; then A13: (p/r)*|.seq1.m.|

convergent for Real_Sequence; coherence proof |.s.| is convergent proof consider g such that A1: for p be Real st 0

0c & s is non-zero implies lim |.s".| = (|. lim s.|)" proof assume A1: s is convergent & (lim s)<>0c & s is non-zero; then s" is convergent by COMSEQ_2:34; hence lim |.s".| = |.lim s".| by Th27 .= |.(lim s)".| by A1,COMSEQ_2:35 .= (|.lim s.|)" by COMPLEX1:66; end; theorem s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero implies lim |.(s9/"s).|=|.(lim s9).|/|.(lim s).| proof assume A1: s9 is convergent & s is convergent & (lim s)<>0c & s is non-zero; then s9/"s is convergent by COMSEQ_2:38; hence lim |.s9/"s.| = |.lim (s9/"s).| by Th27 .= |.(lim s9)/(lim s).| by A1,COMSEQ_2:39 .= |.(lim s9).|/|.(lim s).| by COMPLEX1:67; end; theorem s is convergent & s1 is bounded & (lim s)=0c implies lim |.s(#)s1.| = 0 proof assume A1: s is convergent & s1 is bounded & (lim s)=0c; then s(#)s1 is convergent by COMSEQ_2:42; hence lim |.s(#)s1.| = |.(lim (s(#)s1)).| by Th27 .= 0 by A1,COMPLEX1:44,COMSEQ_2:43; end;